package sample.fxml;
import javafx.event.ActionEvent;
import javafx.fxml.FXML;
import javafx.scene.control.Button;
import javafx.scene.control.Label;
/**
 * @author Junichiro
 * @description
 * @date 2021-03-21 16:34
 **/

public class EventDemoController {

    @FXML
    private Label label;

    @FXML
    private Button button;

    @FXML
    void buttonClick(ActionEvent event) {
        if (label.getText().equals("Hello")){
            label.setText("你好");
        }else{
            label.setText("Hello");
        }
    }
}
